<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:th="http://www.thymeleaf.org">
<head th:include="common_css :: commonHeader('角色审核')"></head>
<body style="background-color: #ffffff">

<form id="myform" method="post">
    <div style="padding:30px">
        <input type="hidden" name="taskId" id="taskId">
        <input type="hidden" name="key" id="key">
        <table cellpadding="2px" cellspacing="0">
            <tr>
                <td align="right">角色名称：</td>
                <td>
                    <input readonly class="easyui-validatebox" name="rolename"></input>
                </td>
            </tr>
            <tr>
                <td align="right">角色类型：</td>
                <td>
                    <input readonly class="easyui-validatebox" name="roleType"></input>
                </td>
            </tr>

            <tr>
                <td align="right">所属机构：</td>
                <td>
                    <input readonly class="easyui-validatebox" name="orgId"></input>
                </td>
            </tr>
            <tr>
                <td align="right">角色说明：</td>
                <td colspan="3">
                    <input class="easyui-textbox" name="description"
                           data-options="multiline:true" style="height:80px;width:430px"/>
                </td>
            </tr>
            <tr id="approve">
                <td align="right">历史批注：</td>
                <td colspan="3">
                    <div id="dg" style="height: 120px"></div>
                </td>
            </tr>
            <tr id="comment">
                <td align="right">批注：</td>
                <td colspan="3">
                    <input class="easyui-textbox" name="message"
                           data-options="multiline:true" style="height:80px;width:430px"/>
                </td>
            </tr>
        </table>

    </div>

</form>
<div id="dlg-buttons" style="text-align:center">
    <a id="save" name="true" href="javascript:void(0)" class="easyui-linkbutton" iconCls="icon-save"
       onclick="saveItem(this.name)">批准</a>
    <a id="back" name="false" href="javascript:void(0)" class="easyui-linkbutton" iconCls="icon-redo"
       onclick="saveItem(this.name)">驳回</a>
    <a href="javascript:void(0)" class="easyui-linkbutton" iconCls="icon-back"
       onclick="back()">返回</a>
</div>

<div id="dlg2" class="easyui-dialog" style="width:550px;height:300px"
     closed="true" modal="true" maximizable="true" resizable="true" buttons="#dlg-buttons2">
    <form id="myform2" method="post">
        <div style="padding:20px">
            <table cellpadding="2px" cellspacing="0" class="form-table">
                <tr>
                    <td align="right">审核人</td>
                    <td>
                        <input readonly class="easyui-validatebox" name="userId"></input>
                    </td>
                </tr>
                <tr>
                    <td align="right">审核时间</td>
                    <td>
                        <input readonly class="easyui-validatebox" name="datetime"></input>
                    </td>
                </tr>
                <tr>
                    <td align="right">审核信息</td>
                    <td>
                        <textarea maxlength="200" style="width: 430px;height: 70px;resize:none" name="msg"></textarea>
                    </td>
                </tr>
            </table>
        </div>

    </form>
    <div id="dlg-buttons2" style="text-align:center">
        <a href="javascript:void(0)" class="easyui-linkbutton" iconCls="icon-back"
           onclick="$('#dlg2').dialog('close')">返回</a>
    </div>
</div>

<div th:include="common_js :: commJS"></div>
<script type="text/javascript" th:inline="javascript">
    $(function () {
        $("#taskId").val([[${taskId}]]);
        $("#key").val([[${key}]]);
        $('#myform').form('load', [[${role}]]); // 页面赋值
        var isassignee = [[${isassignee}]];
        if (isassignee) { // 流程的发起人进入的时候
            $("#comment").hide();
            $('#save').linkbutton({text: '重新提交'});
            $('#back').linkbutton({text: '结束流程'});
        }
        getcommentDataGrid([[${taskId}]]);
    })

</script>
<script type="text/javascript"
        th:src="@{/js/activiti/approve.js}"></script>
</body>
</html>